package com.wavefront.obj.parser;

import com.wavefront.Model;
import com.wavefront.mtl.elements.Material;

public abstract class Parser {

	private static String currentFolder;
	public static Model currentModel;
	public static Material currentMaterial;
	
	public static String getCurrentFolder() {
		return currentFolder;
	}

	public static void setCurrentFolder(String contextFolder) {
		Parser.currentFolder = contextFolder;
	}
	
	public static String combine(String[] s, String glue)
	{
	  int k = s.length;
	  if (k == 0)
	    return null;
	  StringBuilder out=new StringBuilder();
	  out.append(s[0]);
	  for (int x=1;x<k;++x)
	    out.append(glue).append(s[x]);
	  return out.toString();
	}
}
